<?php

class Pages extends Controller
{
	function Pages()
	{
		parent::Controller();
	}
	
	function index()
	{

		if($this->uri->rsegment('3') === FALSE)
		{
			$this->db->where('link', 'home');
		}
		else
		{
			$page = $this->uri->rsegment('3');
			$this->db->where('link', $page);
		}


		$query = $this->db->get('pages');
		$result = $query->row_array();
		$this->template->load('header', $result);
		$this->template->load('content', $result);
		$this->template->load('footer', $result);
	}
}
/* End of file pages.php */
/* Location: modules/pages/controllers/pages.php */
